<%@ page  contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<script type="text/javascript">
function update(){
$("#baocun").blur();
$.CurrentNavtab.find("#update").submit();
}
</script>

<div class="bjui-pageContent tableContent">
<div class="bjui-searchBar clearfix" style="height:40px;padding:10px;">
        	<button class="btn-default" data-icon="plus" data-url="${pageContext.request.contextPath}/data/selectData.do?stationnumber=${rtuu.stationnumber}"
				data-toggle="navtab" data-id="equi-data" data-title="
				 <c:choose>
            <c:when test="${fn:contains(rtuu.stationname,'?')}"></c:when>
            <c:otherwise>
            ${rtuu.stationname}
            </c:otherwise>
            </c:choose>数据">查看数据</button>
            <button class="btn-default" id="baocun" onclick="update()">保存</button>
        </div>
	  <div style="width:98%" align="center">
	<form id="update" action="<%=request.getContextPath()%>/equi/updateRtu.do?stationnumber=${rtuu.stationnumber}" data-toggle="validate" data-reload-navtab="true">
	    <table class="table table-bordered table-hover table-striped table-top" width="99%" align="center" cellspacing="0" cellpadding="0">
          <tr>
            <td width="16%" align="right">测点编号:</td>
            <td width="34%" align="left" id="stationnumber" onclick="tdclick()">&nbsp;
            ${rtuu.stationnumber}</td>
            <td width="15%" align="right">测点名称:</td>
            <td width="35%" align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.stationname,'?')}">
            <input type="text" name="stationname" id="stationname" value=""/></c:when>
            <c:otherwise>
            <input type="text" name="stationname" id="stationname" value="${rtuu.stationname}"/>
            </c:otherwise>
            </c:choose>
            </td>
          </tr>
          <tr>
            <td align="right">设备出厂序列号:</td>
            <td align="left">&nbsp;
            <input type="text" name="rtuserialnumber" id="rtuserialnumber" value="${rtuu.rtuserialnumber}"/></td>
            <td align="right">传感器序列号:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.sensorserialnumber,'?')}">
            <input type="text" name="sensorserialnumber" id="sensorserialnumber" value=""/>
            </c:when>
            <c:otherwise>
            <input type="text" name="sensorserialnumber" id="sensorserialnumber" value="${rtuu.sensorserialnumber}"/>
            </c:otherwise>
            </c:choose>
            </td>
          </tr>
          <tr>
            <td align="right">传感器型号:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.sensortypenumber,'?')}">
            <input type="text" name="sensortypenumber" id="sensortypenumber" value=""/>    
            </c:when>
            <c:otherwise>
            <input type="text" name="sensortypenumber" id="sensortypenumber" value="${rtuu.sensortypenumber}"/>
            </c:otherwise>
            </c:choose>
            </td>
            <td align="right">固件版本号:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.firmverson,'?')}">
            <input type="text" name="firmverson" id="firmverson" value=""/>
            </c:when>
            <c:otherwise>
            <input type="text" name="firmverson" id="firmverson" value="${rtuu.firmverson}"/>
             </c:otherwise>
            </c:choose>
            </td>
          </tr>
          <tr>
            <td align="right">通讯交涉码:</td>
            <td align="left">&nbsp;
             <c:choose>
            <c:when test="${fn:contains(rtuu.password,'?')}">
            <input type="text" name="password" id="password" value=""/>
            </c:when>
            <c:otherwise>
            <input type="text" name="password" id="password" value="${rtuu.password}"/>
            </c:otherwise>
            </c:choose>
            </td>
            <td align="right">设备安装时间:</td>
            <td align="left">&nbsp;
            <fmt:formatDate value='${rtuu.setuptime}' pattern='yyyy-MM-dd HH:mm:ss'/></td>
          </tr>
          <tr>
            <td align="right">地理坐标经度:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.longitude,'?')}">
            <input type="text" name="longitude" id="longitude" value=""/>
            </c:when>
            <c:otherwise>
            <input type="text" name="longitude" id="longitude" value="${rtuu.longitude}"/>
            </c:otherwise>
            </c:choose></td>
            <td align="right">地理坐标纬度:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.latitude,'?')}">
            <input type="text" name="latitude" id="latitude" value=""/>
            </c:when>
            <c:otherwise>
            <input type="text" name="latitude" id="latitude" value="${rtuu.latitude}"/>
            </c:otherwise>
            </c:choose>
            </td>
          </tr>
          <tr>
            <td align="right">传感器埋深:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.sensordepth,'?')}">
            </c:when>
            <c:otherwise>
             <input type="text" name="sensordepth" id="sensordepth" value="${rtuu.sensordepth/1000}"/>m
            </c:otherwise>
            </c:choose>
            </td>
            <td align="right">井口高程:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.highlevel,'?')}"></c:when>
            <c:otherwise>
            <input type="text" name="highlevel" id="highlevel" value="${rtuu.highlevel/1000}"/>m
            </c:otherwise>
            </c:choose>
            </td>
          </tr>
          <tr>
            <td align="right">SIM卡号码:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.simnumber,'?')}">
            <input type="text" name="simnumber" id="simnumber" value=""/>
            </c:when>
            <c:otherwise>
            <input type="text" name="simnumber" id="simnumber" value="${rtuu.simnumber}"/>
            </c:otherwise>
            </c:choose>
            </td>
            <td align="right">电池电压:</td>
            <td align="left">&nbsp;<img src="<%=request.getContextPath()%>/images/${rtuu.batteryPic}.png" border="0" alt="${rtuu.battery}" height="13"/></td>
          </tr>
          <tr>
            <td align="right">数据采样开始时间:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.samplebegintime,'?')}">
            <input type="text" name="samplebegintime" id="samplebegintime" value=""/>
            </c:when>
            <c:otherwise>
            <input type="text" name="samplebegintime" id="samplebegintime" value="${rtuu.samplebegintime}"/>
            </c:otherwise>
            </c:choose>
            </td>
            <td align="right">数据采样的间隔时长:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.sampleinterval,'?')}">
            <input type="text" name="sampleinterval" id="sampleinterval" value=""/>
            </c:when>
            <c:otherwise>
            <input type="text" name="sampleinterval" id="sampleinterval" value="${rtuu.sampleinterval}"/>
            </c:otherwise>
            </c:choose>
            </td>
          </tr>
          <tr>
            <td align="right">数据上传的开始时间:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.datatransbegintime,'?')}">
            <input type="text" name="datatransbegintime" id="datatransbegintime" value=""/>
            </c:when>
            <c:otherwise>
            <input type="text" name="datatransbegintime" id="datatransbegintime" value="${rtuu.datatransbegintime}"/>
            </c:otherwise>
            </c:choose>
            </td>
            <td align="right">数据上传的间隔时长:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.datatransinterval,'?')}">
            <input type="text" name="datatransinterval" id="datatransinterval" value=""/>
            </c:when>
            <c:otherwise>
            <input type="text" name="datatransinterval" id="datatransinterval" value="${rtuu.datatransinterval}"/>
            </c:otherwise>
            </c:choose>
           </td>
          </tr>
          <tr>
            <td align="right">水密度:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.waterdensity,'?')}">
            <input type="text" name="waterdensity" id="waterdensity" value=""/>
            </c:when>
            <c:otherwise>
            <input type="text" name="waterdensity" id="waterdensity" value="${rtuu.waterdensity}"/>
            </c:otherwise>
            </c:choose>
            </td>
            <td align="right">是否需要气压校正:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.airpressurecal,'?')}">
            <input type="text" name="airpressurecal" id="airpressurecal" value=""/>
            </c:when>
            <c:otherwise>
           <input type="text" name="airpressurecal" id="airpressurecal" value="${rtuu.airpressurecal}"/>
            </c:otherwise>
            </c:choose>
          </td>
          </tr>
          <tr>
            <td align="right">厂家索引号:</td>
            <td align="left">&nbsp;
            <c:choose>
            <c:when test="${fn:contains(rtuu.factory,'?')}">
            <input type="text" name="factory" id="factory" value=""/>
            </c:when>
            <c:otherwise>
            <input type="text" name="factory" id="factory" value="${rtuu.factory}" readonly/>
            </c:otherwise>
            </c:choose>
            </td>
            <td align="right">报警信息:</td>
            <td align="left" style="color:red">&nbsp;${rtuu.warning}</td>
          </tr>
          <tr>
            <td align="right">地面高程:</td>
            <td align="left">&nbsp;
            <input type="text" name="groundhigh" id="groundhigh" value="${rtuu.groundhigh/1000}"/>m
            </td>
            <td align="right">注意！</td>
            <td align="left" style="color:red">&nbsp;埋深高程等数据输入时按m输入即可！</td>
          </tr>
        </table>
        </form>
      </div>
</div>	